import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import pinia from './store' 
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import './assets/styles/main.css'
import './assets/styles/element.scss'

// 导入全局组件插件
import globalComponents from './plugins/globalComponents'
// 导入 DataV
import DataVVue3 from '@kjgl77/datav-vue3'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'
const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
// 注册 DataV
app.use(DataVVue3)
app.use(router)
app.use(pinia)
app.use(ElementPlus)
// 注册全局组件
app.use(globalComponents)

app.mount('#app')
